use std::ptr::NonNull;


#[inline(always)]
pub fn get_mut<'a, T>(value: &T) -> &'a mut T {
    unsafe {
        NonNull::new_unchecked((value as *const T) as * mut T).as_mut()
    }
}

pub fn new_bytes(len: usize) -> Box<[u8]> {
    unsafe {
        let mut buf = Vec::with_capacity(len);
        buf.set_len(len);
        buf.into_boxed_slice()
    }
}
